import request from '@/utils/request'

// 查询仓库sku bom列表
export function listBom(query) {
  return request({
    url: '/system/bom/list',
    method: 'get',
    params: query
  })
}

// 查询仓库sku bom详细
export function getBom(skuBomId) {
  return request({
    url: '/system/bom/' + skuBomId,
    method: 'get'
  })
}

// 新增仓库sku bom
export function addBom(data) {
  return request({
    url: '/system/bom',
    method: 'post',
    data: data
  })
}

// 修改仓库sku bom
export function updateBom(data) {
  return request({
    url: '/system/bom',
    method: 'put',
    data: data
  })
}

// 删除仓库sku bom
export function delBom(skuBomId) {
  return request({
    url: '/system/bom/' + skuBomId,
    method: 'delete'
  })
}
